import { NgModule, ErrorHandler } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular'
import { MyApp } from './app.component'

import { HttpServicesProvider } from '../providers/http-services/http-services'
import { ConfigsProvider } from '../providers/configs/configs'
import { HttpClientModule } from '@angular/common/http'
//真机natvie http
import { HTTP } from '@ionic-native/http'
import { IonicStorageModule } from '@ionic/storage'

import { MeseaminspectionworkPage } from '../pages/work/meseaminspectionwork'
import { MeseaminspectionworkdetailitemsPage } from '../pages/work/meseaminspectionworkdetailitems/meseaminspectionworkdetailitems'

import { ContactPage } from '../pages/contact/contact'
import { HomePage } from '../pages/home/home'
import { TabsPage } from '../pages/tabs/tabs'
import { LoginPage } from '../pages/login/login'
import { MeseaminspectionworkdetailPage } from '../pages/work/meseaminspectionworkdetail/meseaminspectionworkdetail'
import { IntroductionPage } from '../pages/home/introduction/introduction'
import { ChangePasswordPage } from '../pages/contact/change-password/change-password'
import { ChangeInformationPage } from '../pages/contact/change-information/change-information'
import { ScanPage } from '../pages/scan/scan'

import { StatusBar } from '@ionic-native/status-bar'
import { SplashScreen } from '@ionic-native/splash-screen'
// 扫描二维码
import { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner'
// 照相
import { Camera } from '@ionic-native/camera'
import { File } from '@ionic-native/file'
import { FileTransfer } from '@ionic-native/file-transfer'
import { ImagePicker } from '@ionic-native/image-picker'
import { Base64 } from '@ionic-native/base64'
// 录像
// import { MediaCapture } from '@ionic-native/media-capture'
@NgModule({
  declarations: [
    MyApp,
    MeseaminspectionworkPage,
    ContactPage,
    HomePage,
    TabsPage,
    LoginPage,
    MeseaminspectionworkdetailPage,
    IntroductionPage,
    ChangePasswordPage,
    ChangeInformationPage,
    ScanPage,
    MeseaminspectionworkdetailitemsPage
  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(MyApp, { tabsHideOnSubPages: 'true' }),
    IonicStorageModule.forRoot({
      name: '__mydb',
      driverOrder: ['indexeddb', 'sqlite', 'websql']
    }),
    HttpClientModule
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    MeseaminspectionworkPage,
    ContactPage,
    HomePage,
    TabsPage,
    LoginPage,
    MeseaminspectionworkdetailPage,
    IntroductionPage,
    ChangePasswordPage,
    ChangeInformationPage,
    ScanPage,
    MeseaminspectionworkdetailitemsPage
  ],
  providers: [
    StatusBar,
    SplashScreen,
    { provide: ErrorHandler, useClass: IonicErrorHandler },
    HttpServicesProvider,
    ConfigsProvider,
    HTTP,
    QRScanner,
    Camera,
    File,
    FileTransfer,
    ImagePicker,
    Base64
    // MediaCapture
  ]
})
export class AppModule {}
